﻿

namespace ResourceReportBuilder
{
    public static class Utils
    {
        public static MimeType GetMimeTypeLocal(string fileName)
        {
            string ext = System.IO.Path.GetExtension(fileName).ToLower();

            MimeTypeCollection col = MimeTypeCollection.FilledInstance;
            foreach (MimeType mimeType in col)
            {
                if (ext == mimeType.Extension)
                {
                    return mimeType;
                }
            }
            return col[0];
        }
    }
}
